<template>
	<view class="search-content">
		<input @blur="getInput" :value="keyword" class="search-input" placeholder="请输入关键词"
			placeholder-class="inputPlaceholder" type="text" />
		<view class="iconfont icon-sousuo"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword: ''
			}
		},
		methods: {
			getInput(e) {
				uni.$emit('getSearchInput', e.detail.value);

			}
		}
	}
</script>

<style lang="scss" scoped>
	.search-content {
		width: 100%;
		border-radius: 40rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 10rpx 10rpx 10rpx 20rpx;
		height: 80rpx;
		box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.08);

		.iconfont {
			width: 120rpx;
			border-radius: 40rpx;
			color: #fff;
			background: $color-primary;
			display: flex;
			align-items: center;
			justify-content: center;
			height: 100%;
			font-size: 40rpx;
		}

		.search-input {
			width: calc(100% - 100rpx);
			font-size: 28rpx;
		}
	}
</style>
